package com.yun.many.auth.dao.enums;

import com.yun.many.dao.enums.IDbEnum;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum ResourceTypeEnum implements IDbEnum<Integer> {

    MENU(1, "菜单"),
    BUTTON(2, "功能模块"),
    API(3, "页面操作");

    private final Integer value;
    private final String desc;

    public static ResourceTypeEnum of(Integer value) {
        for (ResourceTypeEnum item : values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }
}
